Class Algorithm

    • Field Detail

      • counter

        int counter
      • args

        public final ArgumentsBundle args
        The ArgumentsBundle object holding arguments for the algorithm.
      • mPCS

        private java.beans.PropertyChangeSupport mPCS
        Adds Property Change support to track the progress of algorithms.
      • progress

        private double progress
        The current progress of the algorithm.
      • partiteNumber

        private int partiteNumber
        Number passed in using partite number. Somewhat of a bandaid fix because haven't figured out the arguments bundle yet - kpuli
      • PROP_PROGRESS

        public static final java.lang.String PROP_PROGRESS
        Constant for indicating the progress property.
        See Also:
        Constant Field Values
    • Constructor Detail

      • Algorithm

        public Algorithm​(ArgumentsBundle args)
        Public Constructor for creating an Algorithm.
        Parameters:
        args - the ArgumentsBundle containing the arguments for the Algorithm object.
    • Method Detail

      • setPartiteNumber

        public void setPartiteNumber​(int partiteNumber)
      • getPartiteNumber

        public int getPartiteNumber()
      • cull

        protected final java.util.ArrayList<Graph> cull​(java.util.ArrayList<Graph> subGraphs)
        Removes duplicate subGraphs from the provided ArrayList. This ensures that all found Graphs are unique.
        Parameters:
        subGraphs - the ArrayList containing the subGraphs to remove duplicates from.
        Returns:
        the ArrayList of Graph objects containing only unique subgraphs.
      • reorder

        private boolean reorder​(Graph base,
                                Graph match)
        Deprecated.
        No replacement. There is no longer a need to reorder graphs to test equality.
        Reorders the supplied graphs so that the matrices match. The larger graph (in terms of node count) is reordered so that the order of its nodes mirrors that of the smaller. I.e. if the larger graph shares in common three nodes with the smaller, those three nodes are put into the same positions in the larger graph as they are in the smaller graph.
        Parameters:
        base - the Graph object (smaller) to base ordering on.
        match - the Graph object (larger) to reorder.
        Returns:
        a boolean primitive indicating if the graphs are comparable.
      • compare

        private boolean compare​(Graph base,
                                Graph match)
        Compares the two graphs based on edges. Tests to see that the smaller graph is essentially a subGraph of the larger.
        Parameters:
        base - the Graph object (smaller) to match.
        match - the Graph object (larger) to test against.
        Returns:
        a boolean primitive indicating if the smaller Graph is a subgraph of the larger.
      • setProgress

        protected void setProgress​(double progress)
      • addPropertyChangeListener

        public void addPropertyChangeListener​(java.beans.PropertyChangeListener pcl)
        Adds a PropertyChangeListener.
        Parameters:
        pcl - the PropertyChangeListener.
      • removePropertyChangeListener

        public void removePropertyChangeListener​(java.beans.PropertyChangeListener pcl)
        Removes a PropertyChangeListener.
        Parameters:
        pcl - the PropertyChangeListener.